package com.pospi.pospihold.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.pospi.pospihold.R;
import com.pospi.pospihold.dto.GoodsDto;
import com.pospi.pospihold.dto.TitleBeen;

import java.util.List;

/**
 * Created by acer on 2018/10/8.
 */

public class HomeAdapter extends BaseQuickAdapter<TitleBeen,BaseViewHolder> {
    public HomeAdapter(@LayoutRes int layoutResId, @Nullable List<TitleBeen> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, TitleBeen item) {
        helper.setText(R.id.tv_name, item.getName());
        helper.setImageResource(R.id.bg_img, item.getImg());
    }
}
